package com.jibei.mendo.utils;

import android.os.Process;

import com.jibei.mendo.activity.BaseActivity;

/**
 * Created by lhl on 2019/9/21.
 */
public class ProtectProcessUtil {

    private ProtectProcessUtil() {

    }

    public static ProtectProcessUtil getInstance() {
        return ProtectProcessUtil.Holder.instance;
    }

    private static class Holder {
        private static final ProtectProcessUtil instance = new ProtectProcessUtil();
    }

    public void protectProcess(BaseActivity mContext) {
        mContext.finishAffinity();
        Process.killProcess(Process.myPid());
    }
}
